Conversation
Summary of ChangesHello @1000hyehyang, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 Pull Request는 첨부파일 관리 시스템의 S3 스토리지 전략을 개선하여, 파일의 용도에 따라 접근 권한을 분리하고 효율적인 URL 관리를 가능하게 합니다. 퍼블릭 접근이 필요한 파일은 CloudFront를 통해 제공되는 별도의 퍼블릭 S3 버킷에 저장하고, 보안이 필요한 파일은 기존 프라이빗 버킷에 저장하며 Presigned URL을 통해 접근하도록 로직을 변경했습니다. 이를 통해 시스템의 보안성과 유연성을 향상시키고, 향후 캐싱 및 TTL 정책 적용의 기반을 마련했습니다. Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This PR introduces a feature to store attachments in different S3 buckets based on their usage (PUBLIC, CHAT) and generate appropriate access URLs (CloudFront CDN or Presigned URL). A security audit has identified two medium-severity vulnerabilities: an Open Redirect in AttachmentUrlService.java, which could allow attackers to redirect users to malicious websites, and a Path Traversal vulnerability in S3FileUploadServiceImpl.java, which could allow attackers to access unauthorized files in the S3 bucket. The path traversal comment has been enhanced with a reference to the rule regarding S3Key content verification. Additionally, consider restoring the removed Javadoc in the AttachmentUsage enum to improve code readability and maintainability. For PUBLIC usage file uploads, instead of falling back to the private bucket with just a warning log if the public bucket is not configured, it's safer to throw an exception to ensure immediate awareness and correction of the configuration error. This suggestion aligns with the rule on using standard exceptions as placeholders for undefined custom error codes. Please refer to the inline comments for detailed feedback on each file.
Summary
public 버킷 설정 및 usage에 따라 분기
Changes
public 버킷 설정 및 usage에 따라 분기
Type of Change
Related Issues
참고 사항